from pydantic import BaseModel

from cbec.prompt import cost_agent_prompt
from typing import List


class ValidateParametersResp(BaseModel):
    content:str # AI 回复内容
    is_pass:bool    # 是否校验通过



class CostAgent:

    def __init__(self,excel_extractor=None,chat_historys:List[str] = []):
        self.prompt = cost_agent_prompt
        self.excel_extractor = excel_extractor
        self.chat_historys = chat_historys

    def calculate_total_cost(self, product_info, quantity):
        """Calculate the total shipping cost based on product info and quantity"""
        pass
        
    def determine_shipping_channel(self, product_category):
        """Determine the appropriate shipping channel based on product category"""
        pass
        
    def get_price_table(self, shipping_channel):
        """Get the price table for the determined shipping channel"""
        pass
        
    def validate_parameters(
            self,
            chatHistory: List[str] = None
    ) -> ValidateParametersResp:
        """
        Check if all required parameters are present and valid
        :param chatHistory: 历史聊天记录
        :return: ValidateParametersResp 是否通过 | AI回复
        """
        


        
    def calculate_shipping_price(self, price_table, product_info, quantity):
        """Calculate the final shipping price based on the price table, product info and quantity"""
        pass


